package com.example.demo.api;

import com.example.demo.api.factory.RemoteOrderFallbackFactory;
import com.example.demo.api.model.SeataOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value="seata-order", fallbackFactory = RemoteOrderFallbackFactory.class)
public interface RemoteOrderService {

    @PostMapping("order/create")
    SeataOrder create(@RequestParam("userId") Integer userId,@RequestParam("commodityCode") String commodityCode,@RequestParam("orderCount") Integer orderCount);
}
